<?php
/**
 * Created by PhpStorm.
 * User: PanChaoZhi
 * Date: 2017/1/21
 * Time: 18:46
 */
require_once 'lib/mysqli_func.php';
$mysqli = new MySQL();
$id = $_REQUEST['id'];
$proInfo = $mysqli->getProById($id);
//echo '<pre>'.print_r($proInfo, 1).'</pre>';
//exit;
$proImgs = $mysqli->getProImgsById($id);
/*if (! ($proImgs && is_array($proImgs))) {
    alertMes("商品图片错误", "index.php");
}*/
?>
<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <title>商品介绍</title>
    <link type="text/css" rel="stylesheet" href="styles/reset.css">
    <link type="text/css" rel="stylesheet" href="styles/main.css">
    <link type="text/css" rel="stylesheet" media="all"
          href="styles/jquery.jqzoom.css" />
    <script src="scripts/jquery-1.6.js" type="text/javascript"></script>
<!--    <script src="scripts/jquery.jqzoom-core.js" type="text/javascript"></script>-->
    <!--[if IE 6]>
    <script type="text/javascript" src="scripts/DD_belatedPNG_0.0.8a-min.js"></script>
    <script type="text/javascript" src="scripts/ie6Fixpng.js"></script>
    <![endif]-->
    <script type="text/javascript">
        $(document).ready(function() {
            $('.jqzoom').jqzoom({
                zoomType: 'standard',
                lens:true,
                preloadImages: false,
                alwaysOn:false,
                title:false,
                zoomWidth:410,
                zoomHeight:410
            });

        });
    </script>
</head>

<body class="grey">
<div class="headerBar">
    <div class="topBar">
        <div class="comWidth">
            <div class="leftArea">
                <a href="#" class="collection">收藏慕课</a>
            </div>
            <div class="rightArea">
                欢迎来到我的网站！
            </div>
        </div>
    </div>
    <div class="logoBar">
        <div class="comWidth">
            <div class="logo fl">
                <a href="#"><img src="images/logo.jpg" alt="慕课网"></a>
            </div>
            <div class="search_box fl">
                <input type="text" class="search_text fl"> <input type="button"
                                                                  value="搜 索" class="search_btn fr">
            </div>
            <div class="shopCar fr">
                <span class="shopText fl">购物车</span> <span class="shopNum fl">0</span>
            </div>
        </div>
    </div>
    <div class="navBox">
        <div class="comWidth clearfix">
            <div class="shopClass fl">
                <h3>
                    全部商品分类<i class="shopClass_icon"></i>
                </h3>
                <div class="shopClass_show hide">
                    <dl class="shopClass_item">
                        <dt>
                            <a href="#" class="b">手机</a> <a href="#" class="b">数码</a> <a
                                href="#" class="aLink">合约机</a>
                        </dt>
                        <dd>
                            <a href="#">荣耀3X</a> <a href="#">单反</a> <a href="#">智能设备</a>
                        </dd>
                    </dl>
                    <dl class="shopClass_item">
                        <dt>
                            <a href="#" class="b">手机</a> <a href="#" class="b">数码</a> <a
                                href="#" class="aLink">合约机</a>
                        </dt>
                        <dd>
                            <a href="#">荣耀3X</a> <a href="#">单反</a> <a href="#">智能设备</a>
                        </dd>
                    </dl>
                    <dl class="shopClass_item">
                        <dt>
                            <a href="#" class="b">手机</a> <a href="#" class="b">数码</a> <a
                                href="#" class="aLink">合约机</a>
                        </dt>
                        <dd>
                            <a href="#">荣耀3X</a> <a href="#">单反</a> <a href="#">智能设备</a>
                        </dd>
                    </dl>
                    <dl class="shopClass_item">
                        <dt>
                            <a href="#" class="b">手机</a> <a href="#" class="b">数码</a> <a
                                href="#" class="aLink">合约机</a>
                        </dt>
                        <dd>
                            <a href="#">荣耀3X</a> <a href="#">单反</a> <a href="#">智能设备</a>
                        </dd>
                    </dl>
                    <dl class="shopClass_item">
                        <dt>
                            <a href="#" class="b">手机</a> <a href="#" class="b">数码</a> <a
                                href="#" class="aLink">合约机</a>
                        </dt>
                        <dd>
                            <a href="#">荣耀3X</a> <a href="#">单反</a> <a href="#">智能设备</a>
                        </dd>
                    </dl>
                </div>
                <div class="shopClass_list hide">
                    <div class="shopClass_cont">
                        <dl class="shopList_item">
                            <dt>电脑装机</dt>
                            <dd>
                                <a href="#">文字啊</a><a href="#">文字字啊</a><a href="#">文字字字啊</a><a
                                    href="#">文字啊</a><a href="#">文字</a><a href="#">文字啊</a>
                            </dd>
                        </dl>
                        <dl class="shopList_item">
                            <dt>电脑装机</dt>
                            <dd>
                                <a href="#">文字啊</a><a href="#">文字字啊</a><a href="#">文字字字啊</a><a
                                    href="#">文字啊</a><a href="#">文字</a><a href="#">文字啊</a><a
                                    href="#">文字啊</a><a href="#">文字字啊</a><a href="#">文字字字啊</a><a
                                    href="#">文字啊</a><a href="#">文字</a><a href="#">文字啊</a><a
                                    href="#">文字啊</a>
                            </dd>
                        </dl>
                        <dl class="shopList_item">
                            <dt>电脑装机</dt>
                            <dd>
                                <a href="#">文字啊</a><a href="#">文字字啊</a><a href="#">文字字字啊</a><a
                                    href="#">文字啊</a><a href="#">文字</a><a href="#">文字啊</a><a
                                    href="#">文字啊</a><a href="#">文字字啊</a><a href="#">文字字字啊</a><a
                                    href="#">文字啊</a><a href="#">文字</a><a href="#">文字啊</a><a
                                    href="#">文字啊</a>
                            </dd>
                        </dl>
                        <dl class="shopList_item">
                            <dt>电脑装机</dt>
                            <dd>
                                <a href="#">文字啊</a><a href="#">文字字啊</a><a href="#">文字字字啊</a><a
                                    href="#">文字啊</a><a href="#">文字</a><a href="#">文字啊</a><a
                                    href="#">文字啊</a><a href="#">文字字啊</a><a href="#">文字字字啊</a><a
                                    href="#">文字啊</a><a href="#">文字</a><a href="#">文字啊</a><a
                                    href="#">文字啊</a>
                            </dd>
                        </dl>
                        <dl class="shopList_item">
                            <dt>电脑装机</dt>
                            <dd>
                                <a href="#">文字啊</a><a href="#">文字字啊</a><a href="#">文字字字啊</a><a
                                    href="#">文字啊</a><a href="#">文字</a><a href="#">文字啊</a><a
                                    href="#">文字啊</a><a href="#">文字字啊</a><a href="#">文字字字啊</a><a
                                    href="#">文字啊</a><a href="#">文字</a><a href="#">文字啊</a><a
                                    href="#">文字啊</a>
                            </dd>
                        </dl>
                        <div class="shopList_links">
                            <a href="#">文字测试内容等等<span></span></a><a href="#">文字容等等<span></span></a>
                        </div>
                    </div>
                </div>
            </div>
            <ul class="nav fl">
                <li><a href="#" class="active">数码城</a></li>
                <li><a href="#">天黑黑</a></li>
                <li><a href="#">团购</a></li>
                <li><a href="#">发现</a></li>
                <li><a href="#">二手特卖</a></li>
                <li><a href="#">名品会</a></li>
            </ul>
        </div>
    </div>
</div>
<div class="userPosition comWidth">
    <strong><a href="#">首页</a></strong> <span>&nbsp;&gt;&nbsp;</span> <a
        href="#"><?php echo $proInfo['cName'];?></a> <span>&nbsp;&gt;&nbsp;</span>
    <em><?php echo $proInfo['pSn'];?></em>
</div>
<div class="description_info comWidth">
    <div class="description clearfix">
        <div class="leftArea">
            <div class="description_imgs">
                <div class="big">
                    <a href="image_800/<?php echo  $proImgs[0]['albumPath'];?>"
                       class="jqzoom" rel='gal1' title="triumph"> <img width="309"
                                                                       height="340"
                                                                       src="image_350/<?php  echo $proImgs[0]['albumPath'];?>"
                                                                       title="triumph">
                    </a>
                </div>
                <ul class="des_smimg clearfix" id="thumblist">
                    <?php foreach($proImgs as $key=>$proImg):?>
                        <li><a class="<?php echo $key==0?"zoomThumbActive":"";?> active"
                               href='javascript:void(0);'
                               rel="{gallery: 'gal1', smallimage: 'image_350/<?php echo $proImg['albumPath'];?>',largeimage: 'image_800/<?php echo $proImg['albumPath'];?>'}"><img
                                    src="images/banner/banner01.jpg" width="50" height="50" alt=""></a></li>
                    <?php endforeach;?>
                </ul>
            </div>
        </div>
        <div class="rightArea">
            <div class="des_content">
                <h3 class="des_content_tit"><?php echo $proInfo['pName'];?></h3>
                <div class="dl clearfix">
                    <div class="dt">慕课价</div>
                    <div class="dd clearfix">
                        <span class="des_money"><em>￥</em><?php echo $proInfo['iPrice'];?></span>
                    </div>
                </div>
                <div class="dl clearfix">
                    <div class="dt">优惠</div>
                    <div class="dd clearfix">
                        <span class="hg"><i class="hg_icon">满换购</i><em>购ipad加价优惠够配件或USB充电插座</em></span>
                    </div>
                </div>
                <div class="des_position">
                    <div class="dl clearfix">
                        <div class="dt">送到</div>
                        <div class="dd clearfix">
                            <div class="select">
                                <h3>海淀区五环内</h3>
                                <span></span>
                                <ul class="show_select">
                                    <li>上帝</li>
                                    <li>五道口</li>
                                    <li>上帝</li>
                                </ul>
                            </div>
                            <span class="theGoods">有货，可当日出货</span>
                        </div>
                    </div>
                    <div class="dl clearfix">
                        <div class="dt colorSelect">选择颜色</div>
                        <div class="dd clearfix">
                            <div class="des_item des_item_acitve">WIFI 16GB</div>
                            <div class="des_item">WIFI 16GB</div>
                            <div class="des_item">WIFI 16GB</div>
                        </div>
                    </div>
                    <div class="dl clearfix">
                        <div class="dt des_select_more">选择版本</div>
                        <div class="dd clearfix ">
                            <div class="des_item des_item_sm des_item_acitve">WIFI 16GB</div>
                            <div class="des_item des_item_sm">WIFI 16GB + 3G</div>
                            <div class="des_item des_item_sm">WIFI + 3G</div>
                            <div class="des_item des_item_sm">WIFI 16GB</div>
                            <div class="des_item des_item_sm">WIFI 16GB + 3G</div>
                            <div class="des_item des_item_sm">WIFI + 3G</div>
                            <div class="des_item des_item_sm">WIFI 16GB</div>
                            <div class="des_item des_item_sm">WIFI 16GB + 3G</div>
                            <div class="des_item des_item_sm">WIFI + 3G</div>
                        </div>
                    </div>

                    <div class="dl">
                        <div class="dt des_num">数量</div>
                        <div class="dd clearfix">
                            <div class="des_number">
                                <div class="reduction">-</div>
                                <div class="des_input">
                                <!-- 这里onblur是失焦事件，当鼠标离开输入框的时候，触发onblur事件，同时执行被调用的程序 -->
                                    <input type="text" id="number" value="1" onblur=""style="border: 1px solid #ccc;">
                                </div>
                                <div class="plus">+</div>
                            </div>
                            <span class="xg">限购<em>9</em>件
								</span>
                        </div>
                    </div>

                </div>
                <div class="des_select">
                    已选择 <span>"白色|WIFI 16G"</span>
                </div>



                <div class="shop_buy">
                    <a href="javascript:addCart(<?php echo $proInfo['id'];?>)" class="shopping_btn"></a>
                    <span class="line"></span>
                    <a href="#" class="buy_btn"></a>
                </div>
                <script type="text/javascript">
                    function addCart(productid) {
                        //alert(productid);
                        //ajax请求php脚本完成数据的添加 添加到imooc_cart数据库
                        var url = "addCart.php";
                        var data = {"productid":productid, "num":parseInt($("#number").val())};
                        var success = function (response) {
                            //
                            if (response.errno == 0) {
                                alert("加入购物车成功!");
                                window.location='cart.php';
                            } else if (response.errno == -1) {
                                alert("请先登录!");
                                window.location='login.php';
                            }else {
                                alert("加入购物车失败！");
                            }
                        }
                        $.post(url, data, success, "json");
                    }
                </script>



                <div class="notes">注意：此商品可提供普通发票，不提供增值税发票。</div>
            </div>
        </div>
    </div>
</div>
<div class="hr_15"></div>
<div class="des_info comWidth clearfix">
    <div class="leftArea">
        <div class="recommend">
            <h3 class="tit">同价位</h3>
            <div class="item">
                <div class="item_cont">
                    <div class="img_item">
                        <a href="#"><img src="images/shopImg.jpg" alt=""></a>
                    </div>
                    <p>
                        <a href="#">文字介绍文字介绍文字介绍文字介绍文字介绍文字介绍</a>
                    </p>
                    <p class="money">￥888</p>
                </div>
            </div>
            <div class="item">
                <div class="item_cont">
                    <div class="img_item">
                        <a href="#"><img src="images/shopImg.jpg" alt=""></a>
                    </div>
                    <p>
                        <a href="#">文字介绍文字介绍文字介绍文字介绍文字介绍文字介绍</a>
                    </p>
                    <p class="money">￥888</p>
                </div>
            </div>
            <div class="item">
                <div class="item_cont">
                    <div class="img_item">
                        <a href="#"><img src="images/shopImg.jpg" alt=""></a>
                    </div>
                    <p>
                        <a href="#">文字介绍文字介绍文字介绍文字介绍文字介绍文字介绍</a>
                    </p>
                    <p class="money">￥888</p>
                </div>
            </div>
        </div>
        <div class="hr_15"></div>
        <div class="recommend">
            <h3 class="tit">同价位</h3>
            <div class="item">
                <div class="item_cont">
                    <div class="img_item">
                        <a href="#"><img src="images/shopImg.jpg" alt=""></a>
                    </div>
                    <p>
                        <a href="#">文字介绍文字介绍文字介绍文字介绍文字介绍文字介绍</a>
                    </p>
                    <p class="money">￥888</p>
                </div>
            </div>
            <div class="item">
                <div class="item_cont">
                    <div class="img_item">
                        <a href="#"><img src="images/shopImg.jpg" alt=""></a>
                    </div>
                    <p>
                        <a href="#">文字介绍文字介绍文字介绍文字介绍文字介绍文字介绍</a>
                    </p>
                    <p class="money">￥888</p>
                </div>
            </div>
            <div class="item">
                <div class="item_cont">
                    <div class="img_item">
                        <a href="#"><img src="images/shopImg.jpg" alt=""></a>
                    </div>
                    <p>
                        <a href="#">文字介绍文字介绍文字介绍文字介绍文字介绍文字介绍</a>
                    </p>
                    <p class="money">￥888</p>
                </div>
            </div>
        </div>
    </div>
    <div class="rightArea">
        <div class="des_infoContent">
            <ul class="des_tit">
                <li class="active"><span>产品介绍</span></li>
                <li><span>产品评价(12312)</span></li>
            </ul>
            <div class="ad">
                <a href="#"><img src="images/ad.jpg"></a>
            </div>
            <div class="info_text">
                <div class="info_tit">
                    <h3>强烈推荐</h3>
                    <h4>货比三家，还选</h4>
                </div>
                <p>现在就是买mini的好时候！换代清仓直降，但苹果品质不变！A5双核，内置Lightning闪电接口，正反可插，方便人性。小身材，炫丽的7.9英寸显示屏，7.2mm的厚度，薄如铅笔。女生包包随身携带更时尚！facetime视频通话，与密友24小时畅聊不断线。微信倾力打造，你的智能助理。苹果的牌子就不用我说了，1111补仓，存货不多哦！</p>
                <div class="hr_45"></div>
                <div class="info_tit">
                    <h3>强烈推荐</h3>
                    <h4>货比三家，还选</h4>
                </div>
                <p>现在就是买mini的好时候！换代清仓直降，但苹果品质不变！A5双核，内置Lightning闪电接口，正反可插，方便人性。小身材，炫丽的7.9英寸显示屏，7.2mm的厚度，薄如铅笔。女生包包随身携带更时尚！facetime视频通话，与密友24小时畅聊不断线。微信倾力打造，你的智能助理。苹果的牌子就不用我说了，1111补仓，存货不多哦！</p>
                <div class="hr_45"></div>
                <img src="images/pad.jpg" class="center">
                <div class="hr_45"></div>
            </div>
        </div>
        <div class="hr_15"></div>
        <div class="des_infoContent">
            <h3 class="shopDes_tit">商品评价</h3>
            <div class="score_box clearfix">
                <div class="score">
                    <span>4.7</span><em>分</em>
                </div>
                <div class="score_speed">
                    <ul class="score_speed_text">
                        <li class="speed_01">非常不满意</li>
                        <li class="speed_02">不满意</li>
                        <li class="speed_03">一般</li>
                        <li class="speed_04">满意</li>
                        <li>非常满意</li>
                    </ul>
                    <div class="score_num">
                        4.7<i></i>
                    </div>
                    <p>共18939位慕课网友参与评分</p>
                </div>
            </div>
            <div class="review_tab">
                <ul class="review fl">
                    <li><a href="#" class="active">全部</a></li>
                    <li><a href="#">满意（3121）</a></li>
                    <li><a href="#">一般（321）</a></li>
                    <li><a href="#">不满意（1121）</a></li>
                </ul>
                <div class="review_sort fr">
                    <a href="#" class="review_time">时间排序</a><a href="#"
                                                               class="review_reco">推荐排序</a>
                </div>
            </div>
            <div class="review_listBox">
                <div class="review_list clearfix">
                    <div class="review_userHead fl">
                        <div class="review_user">
                            <img src="images/userhead.jpg" alt="">
                            <p>61***42</p>
                            <p>金色会员</p>
                        </div>
                    </div>
                    <div class="review_cont">
                        <div class="review_t clearfix">
                            <div class="starsBox fl">
                                <span class="stars"></span><span class="stars"></span><span
                                    class="stars"></span><span class="stars"></span><span
                                    class="stars"></span>
                            </div>
                            <span class="stars_text fl">5分 满意</span>
                        </div>
                        <p>赖慕课挺不错的信赖慕课挺不错的，信赖慕课</p>
                        <p>
                            <a href="#" class="ding">顶(0)</a><a href="#" class="cai">踩(0)</a>
                        </p>
                    </div>
                </div>
                <div class="review_list clearfix">
                    <div class="review_userHead fl">
                        <div class="review_user">
                            <img src="images/userhead.jpg" alt="">
                            <p>61***42</p>
                            <p>金色会员</p>
                        </div>
                    </div>
                    <div class="review_cont">
                        <div class="review_t clearfix">
                            <div class="starsBox fl">
                                <span class="stars"></span><span class="stars"></span><span
                                    class="stars"></span><span class="stars"></span><span
                                    class="stars"></span>
                            </div>
                            <span class="stars_text fl">5分 满意</span>
                        </div>
                        <p>赖慕课挺不错的信赖慕课挺不错的，信赖慕课</p>
                        <p>
                            <a href="#" class="ding">顶(0)</a><a href="#" class="cai">踩(0)</a>
                        </p>
                    </div>
                </div>
                <div class="hr_25"></div>
            </div>
        </div>
    </div>
</div>
<div class="hr_25"></div>
<div class="footer">
    <p>
        <a href="#">慕课简介</a><i>|</i><a href="#">慕课公告</a><i>|</i> <a href="#">招纳贤士</a><i>|</i><a
            href="#">联系我们</a><i>|</i>客服热线：400-675-1234
    </p>
    <p>Copyright &copy; 2006 - 2014
        慕课版权所有&nbsp;&nbsp;&nbsp;京ICP备09037834号&nbsp;&nbsp;&nbsp;京ICP证B1034-8373号&nbsp;&nbsp;&nbsp;某市公安局XX分局备案编号：123456789123</p>
    <p class="web">
        <a href="#"><img src="images/webLogo.jpg" alt="logo"></a><a href="#"><img
                src="images/webLogo.jpg" alt="logo"></a><a href="#"><img
                src="images/webLogo.jpg" alt="logo"></a><a href="#"><img
                src="images/webLogo.jpg" alt="logo"></a>
    </p>
</div>
</body>
</html>
